#include <REGX52.H>
#include "delay.h"
#include "key.h"
#include "led.h"

void LED_Waterflow() {
    LED_PORT=0xFE;//1111 1110
    Delay_ms(1000);
    LED_PORT=0xFD;//1111 1101
    Delay_ms(1000);
    LED_PORT=0xFB;//1111 1011
    Delay_ms(100);
    LED_PORT=0xF7;//1111 0111
    Delay_ms(100);
    LED_PORT=0xEF;//1110 1111
    Delay_ms(100);
    LED_PORT=0xDF;//1101 1111
    Delay_ms(100);
    LED_PORT=0xBF;//1011 1111
    Delay_ms(100);
    LED_PORT=0x7F;//0111 1111
    Delay_ms(100);
}

void LED_Task() {
//    unsigned char keyNum = KEY_Getvalue();
//    if (keyNum == KEYNUM2) {
        LED_Waterflow();
//    }
    
}
    